<%picid=Request.QueryString("id")%> <% if Request.QueryString("year")<>"" then yearpath=Request.QueryString("year")& "/" else yearpath="" end if %>
>
<% strPath = "images/photos/"& yearpath & picid & ".txt" Set FileObject = Server.CreateObject("Scripting.FileSystemObject") InFile = Server.MapPath (strPath) if FileObject.FileExists(infile) then Set objText = FileObject.OpenTextFile(InFile) If not objText.atEndOfStream Then FileContents = objText.ReadAll if FileContents<>"" then %> <%=FileContents%>
<% end if end if objText.Close Set objText = Nothing end if '''file exists Set FileObject = Nothing %>